package work2;

import java.util.Scanner;

public class Quetion2 {
	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);
		int n, r;

		System.out.println("请输入一个四位整数：");
		n = input.nextInt();
		input.close();

		String temp = new StringBuffer(Integer.toString(n)).reverse().toString();
		r = Integer.parseInt(temp) + 1;

		System.out.printf("%d的逆序数加1为：%d\n", n, r);
	}

}